package com.hxzy.driver.mapper;

import com.hxzy.driver.entity.Driver;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
* @author 11452
* @description 针对表【tb_driver(代驾司机表)】的数据库操作Mapper
* @createDate 2023-12-13 16:32:27
* @Entity com.hxzy.driver.entity.Driver
*/
public interface DriverMapper extends BaseMapper<Driver> {

    @Select(value = "select count(0) from tb_driver where open_id=#{openId}")
    long hasDriver(String openId);


    @Select(value = "select id,ifnull(real_auth,1) as real_auth from tb_driver where open_id=#{openId} ")
    Driver getDriverByOpenId(String openId);
}




